package nc.bs.so.m32.point.rule;

import org.apache.commons.lang3.ArrayUtils;

import nc.bs.businessevent.EventDispatcher;
import nc.bs.businessevent.bd.BDCommonEvent;
import nc.vo.pub.BusinessException;
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
import nc.vo.so.m32.entity.SaleInvoiceVO;

public class DeleteAfterEventRule extends BaseEventRule {

	public void process(SaleInvoiceVO[] vos) {
		if (ArrayUtils.isNotEmpty(vos)) {
			try {
				SaleInvoiceVO[] cvos = cloneVOs(vos);
				String sourceID = "08958fdf-e3fa-4cc9-96d6-1c15cec4645f";
				BDCommonEvent event = new BDCommonEvent(sourceID, "1006", null, cvos);
				EventDispatcher.fireEvent(event);
			} catch (BusinessException e) {
				ExceptionUtils.wrappException(e);
			}
		}
	}

}